import React from 'react';
import { Form } from 'antd';
import { AxCreateGridThreeForm } from '@/components/AxForm/AxCreateForm';
import { AxDatePicker, AxInput, AxSelectEnum } from '@/components/AxForm/AxFormItem';

const Index: React.FC<any> = props => {
    const { form, values = {}, ...rest } = props;

    return (
        <AxCreateGridThreeForm
            form={form}
            title={`确定发货 - ${values.orderId}`}
            {...rest}
            items={[
                <AxSelectEnum
                    form={form}
                    label="配送形式"
                    field="shippedType"
                    required={false}
                    enumName='shippedType'
                />,
                <AxInput
                    form={form}
                    label="车辆号牌"
                    field="carNumber"
                    required={false}
                />,
                <AxDatePicker
                    form={form}
                    label="发车时间"
                    field="carLeaveTime"
                    required={false}
                />,
                <AxDatePicker
                    form={form}
                    label="预计到货时间"
                    field="carArriveTime"
                    required={false}
                />,
                <AxInput
                    form={form}
                    label="物流公司"
                    field="logisticsCompany"
                    required={false}
                />,
                <AxInput
                    form={form}
                    label="运单号"
                    field="logisticsNumber"
                    required={false}
                />,
                <AxInput
                    form={form}
                    label="联系人"
                    field="shippedLinkMan"
                    required={false}
                />,
                <AxInput
                    form={form}
                    label="联系电话"
                    field="shippedContact"
                    required={false}
                />,
            ]}
        />
    );
};

export default Form.create<any>()(Index);
